package com.zmm.zebulon.module.pay.enums.wallet;

import com.zmm.zebulon.common.core.ArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * description: 钱包交易业务分类
 *
 * @author zebulon
 * package com.zmm.zebulon.module.pay.enums.wallet
 * name: PayWalletBizTypeEnum
 * date 2024/1/11 23:07
 */
@AllArgsConstructor
@Getter
public enum PayWalletBizTypeEnum implements ArrayValuable<Integer> {

    RECHARGE(1, "充值"),
    RECHARGE_REFUND(2, "充值退款"),
    PAYMENT(3, "支付"),
    PAYMENT_REFUND(4, "支付退款"),

    UPDATE_BALANCE(5, "更新余额"),
    TRANSFER(6, "转账");

    // TODO 后续增加

    /**
     * 业务分类
     */
    private final Integer type;
    /**
     * 说明
     */
    private final String description;

    public static final Integer[] ARRAYS = Arrays.stream(values()).map(PayWalletBizTypeEnum::getType).toArray(Integer[]::new);

    @Override
    public Integer[] array() {
        return ARRAYS;
    }
}
